home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / standard / czclear.z / czclear
Encoding:
Text File  |  2002-10-03  |  8.1 KB  |  142 lines

  1.  
  2.  
  3.  
  4. cccczzzzcccclllleeeeaaaarrrr((((3333GGGG))))                                                        cccczzzzcccclllleeeeaaaarrrr((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      cccczzzzcccclllleeeeaaaarrrr - clears the color bitplanes and the z-buffer simultaneously
  10.  
  11. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  12.      vvvvooooiiiidddd cccczzzzcccclllleeeeaaaarrrr((((uuuunnnnssssiiiiggggnnnneeeedddd lllloooonnnngggg ccccvvvvaaaallll,,,, lllloooonnnngggg zzzzvvvvaaaallll))))
  13.  
  14. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  15.      _c_v_a_l   expects the color to which you want to clear the color bitplanes.
  16.  
  17.      _z_v_a_l   expects the depth value to which you want to clear the z-buffer.
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      cccczzzzcccclllleeeeaaaarrrr sets the color bitplanes in the area of the viewport to _c_v_a_l, and
  21.      the z buffer bitplanes in the area of the viewport to _z_v_a_l.  Multiple
  22.      color bitplane buffers can be cleared simultaneously using the bbbbaaaacccckkkkbbbbuuuuffffffffeeeerrrr
  23.      and ffffrrrroooonnnnttttbbbbuuuuffffffffeeeerrrr commands.  The screen mask, when it is set to a subregion
  24.      of the viewport, bounds the cleared region.  Most other drawing modes,
  25.      including alpha function, blend function, logical operation, polygon fill
  26.      pattern, stenciling, texture mapping, writemask, zwritemask, and z
  27.      buffering, have no effect on the operation of cccczzzzcccclllleeeeaaaarrrr.  The current color
  28.      does not change.
  29.  
  30.      Because only the normal framebuffer includes a z buffer, cccczzzzcccclllleeeeaaaarrrr should
  31.      be called only while draw mode is NNNNOOOORRRRMMMMAAAALLLLDDDDRRRRAAAAWWWW.
  32.  
  33.      In RGB mode, the _c_v_a_l parameter expects a packed integer of the same
  34.      format used by ccccppppaaaacccckkkk, namely 0x_a_a_b_b_g_g_r_r, where _r_r is the red value, _b_b
  35.      the blue value, _g_g the green value, and _a_a is the alpha value.  In color
  36.      map mode this parameter expects an index into the current color map, so
  37.      only up to 12 of the least-significant bits are significant.
  38.  
  39.      The valid range of the _z_v_a_l parameter depends on the graphics hardware.
  40.      When multisample is enabled, and multisample buffers exist in the current
  41.      framebuffer configuration in the current drawmode, the minimum is the
  42.      value returned by ggggeeeettttggggccccoooonnnnffffiiiigggg((((GGGGCCCC____MMMMSSSS____ZZZZMMMMIIIINNNN)))) and the maximum is the value
  43.      returned by ggggeeeettttggggccccoooonnnnffffiiiigggg((((GGGGCCCC____MMMMSSSS____ZZZZMMMMAAAAXXXX)))).  Otherwise, the minimum is the value
  44.      returned by ggggeeeettttggggccccoooonnnnffffiiiigggg((((GGGGCCCC____ZZZZMMMMIIIINNNN)))) and the maximum is the value returned by
  45.      ggggeeeettttggggccccoooonnnnffffiiiigggg((((GGGGCCCC____ZZZZMMMMAAAAXXXX)))).  It is unaffected by the state of the GLC_ZRANGEMAP
  46.      compatibility mode (see ggggllllccccoooommmmppppaaaatttt).
  47.  
  48.      After cccczzzzcccclllleeeeaaaarrrr executes, the graphics position is undefined.
  49.  
  50. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  51.      afunction, blendfunction, clear, cpack, getgdesc, glcompat, logicop,
  52.      scrmask, setpattern, stencil, texbind, wmpack, writemask, zbuffer,
  53.      zclear, zfunction
  54.  
  55. NNNNOOOOTTTTEEEESSSS
  56.      Whenever you need to clear both the z-buffer and the color bitplanes to
  57.      constant values at the same time, use cccczzzzcccclllleeeeaaaarrrr.  A simultaneous clear will
  58.      take place if circumstances allow it.  There is never a penalty in
  59.      calling cccczzzzcccclllleeeeaaaarrrr over calling cccclllleeeeaaaarrrr and zzzzcccclllleeeeaaaarrrr sequentially.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. cccczzzzcccclllleeeeaaaarrrr((((3333GGGG))))                                                        cccczzzzcccclllleeeeaaaarrrr((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      IRIS-4D GT and GTX models can do a simultaneous clear only under the
  75.      following circumstances:
  76.  
  77.      +o    In RGB mode, the 24 least significant bits of _c_v_a_l (red, green, and
  78.           blue) must be identical to the 24 least significant bits of _z_v_a_l.
  79.  
  80.      +o    In color map mode, the 12 least significant bits of _c_v_a_l must be
  81.           identical to the 12 least significant bits of _z_v_a_l.
  82.  
  83.      IRIS-4D VGX models always clear color and z bitplanes banks sequentially,
  84.      regardless of the values of _c_v_a_l and _z_v_a_l.
  85.  
  86.      On the Personal Iris, XS, XS24, XZ, Elan and Extreme, you can speed up
  87.      cccczzzzcccclllleeeeaaaarrrr by as much as a factor of four for common values of _z_v_a_l if you
  88.      call zzzzffffuuuunnnnccccttttiiiioooonnnn in conjunction with it such that one of the following
  89.      conditions are met:
  90.  
  91.                    _____________________________________________
  92.                           _z_v_a_l        |        zzzzffffuuuunnnnccccttttiiiioooonnnn
  93.                    _____________________________________________
  94.                     ggggeeeettttggggddddeeeesssscccc((((GGGGDDDD____ZZZZMMMMIIIINNNN))))   ZZZZFFFF____GGGGRRRREEEEAAAATTTTEEEERRRR _o_r ZZZZFFFF____GGGGEEEEQQQQUUUUAAAALLLL
  95.                     ggggeeeettttggggddddeeeesssscccc((((GGGGDDDD____ZZZZMMMMAAAAXXXX))))   ZZZZFFFF____LLLLEEEESSSSSSSS _o_r ZZZZFFFF____LLLLEEEEQQQQUUUUAAAALLLL
  96.                    _____________________________________________
  97.                    |||||
  98.  
  99.  
  100.  
  101.                                                                 |||||
  102.  
  103.  
  104.  
  105.  
  106.  
  107.      Iris Indigo, Indy, and XL systems have a 32-bit zbuffer so use
  108.      ggggeeeettttggggddddeeeesssscccc((((GGGGDDDD____ZZZZMMMMAAAAXXXX)))) to get the maximum z value and ggggeeeettttggggddddeeeesssscccc((((GGGGDDDD____ZZZZMMMMIIIINNNN)))) to get
  109.      the minimum z value.
  110.  
  111.      For performance reasons, Elan, XS, and XS24 products do not physically
  112.      clear the z-buffer when calling cccczzzzcccclllleeeeaaaarrrr.  On these systems, the LSB of
  113.      the z-buffer is used as a flag bit to signal that the z-buffer has been
  114.      cleared.  The 23 remaining bits are used for the z comparison.  In order
  115.      to physically clear the z-buffer, first call zzzzffffuuuunnnnccccttttiiiioooonnnn((((ZZZZFFFF____AAAALLLLWWWWAAAAYYYYSSSS)))), then
  116.      draw a polygon whose z coordinates map to the desired z value.  To avoid
  117.      updating the framebuffer, call wwwwmmmmppppaaaacccckkkk((((0000)))) before drawing.  Restore the
  118.      writemask and z function afterwards.
  119.  
  120. BBBBUUUUGGGGSSSS
  121.      IRIS-4D G models always clear their z-buffers to GGGGDDDD____ZZZZMMMMAAAAXXXX, regardless of
  122.      the value passed to cccczzzzcccclllleeeeaaaarrrr.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.                                                                         PPPPaaaaggggeeee 2222
  139.  
  140.  
  141.  
  142.